package com.gxuwz.medical.domain.institution;

import java.sql.SQLException;
import java.util.List;

import com.gxuwz.medical.dao.InstitutionDao;
import com.gxuwz.medical.vo.PageBean;

public class Institution {
	private String areacode;//行政区域编码
	private String agencode;//农合机构编码
	private String agenname;//农合机构名称
	private int grade;//经办机构级别，区别于行政区域级别，1表示县级农合办，2表示镇级农合点
	private InstitutionDao institutiondao = new InstitutionDao();
	public void add() throws SQLException {
		institutiondao.add(this);
	}
	public void del(String agencode) throws SQLException {
		institutiondao.del(agencode);
	}
	public void update() throws SQLException {
		institutiondao.upadte(this);
	}
	public Institution query() throws SQLException {
		return institutiondao.query(agencode);
	}
	public List<Institution> queryAll() throws SQLException {
		return institutiondao.queryAll();
	}
	public PageBean queryAll(int page,int size) throws SQLException {
		return institutiondao.queryAll(page,size);
	}
	
	public String getAreacode() {
		return areacode;
	}
	public void setAreacode(String areacode) {
		this.areacode = areacode;
	}
	public String getAgencode() {
		return agencode;
	}
	public void setAgencode(String agencode) {
		this.agencode = agencode;
	}
	public String getAgenname() {
		return agenname;
	}
	public void setAgenname(String agenname) {
		this.agenname = agenname;
	}
	public int getGrade() {
		return grade;
	}
	public void setGrade(int grade) {
		this.grade = grade;
	}
	
}
